import requests

class TestTpshopRegister:
    def test_register(self):
        code_url = "https://hmshop-test.itheima.net/index.php/Home/User/verify/type/user_reg.html"
        code_register = "https://hmshop-test.itheima.net/Home/User/reg.html"
        register_data = {"auth_code": "TPSHOP","scene": 1,"username": 13341292432,"verify_code": 8888,
        "password": "404e7124f2f27a92acd9c0466243754c","password2": "404e7124f2f27a92acd9c0466243754c","invite": ""}

        sess = requests.session()
        resp_code = sess.get(url=code_url)
        resp_register = sess.post(url=code_register,data=register_data)
        print(resp_register.json())

        assert "注册成功" in resp_register.json()["msg"]
